#ifndef __MYTHREADPOOL_H__
#define __MYTHREADPOOL_H__
#include <functional>
#include <vector>
#include <queue>
#include <thread>
#include <mutex>
#include <condition_variable>

struct  ThreadPoolPrivate;

class ThreadPool
{
public:
    ThreadPool(int minThreads, int maxThreads, int queueSize);
    ~ThreadPool();

    void addTask(std::function<void()> task);
    void stop();

private:
    ThreadPoolPrivate * p;
    void workerThread();
    void managerThread();
};



#endif